<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
</head>
<body>
	<h1>我的第一段JavaScript</h1>
	<p id="demo">JavaScript 能改变HTML元素的样式。</p>
	<script type="text/javascript">
		function myFunction(){
			x=document.getElementById('demo');
			x.style.color="#ff0000";
		}
	</script>
	<button type="button" onclick="myFunction()">点击这里</button>
</body>
</html>